﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CosmicBodyList.aspx.cs" Inherits="ExampleWebApplication.CosmicBobyList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <fieldset>
            <legend>By id:</legend>
            <asp:TextBox ID="IdText" runat="server"/><asp:Button Text="Search" OnClick="OnSearch" runat="server" />
        </fieldset>
        <fieldset>
            <legend>Name contains:</legend>
            <asp:TextBox ID="NamePartText" runat="server"/><asp:Button Text="Search" OnClick="OnSearch" runat="server" />
        </fieldset>
        <fieldset>
            <legend>Select type:</legend>
            <asp:ListView ID="ItemTypesList" runat="server">
                <ItemTemplate>
                    <a href='<%#Eval("Href")%>' runat="server"><%#Eval("Name")%></a><br/>
                </ItemTemplate>
            </asp:ListView>
        </fieldset>

        <table>
            <asp:ListView ID="ItemsList" runat="server">
                <ItemTemplate>
                    <tr>
                        <td><%#Eval("Id")%></td>
                        <td><%#Eval("Name")%></td>
                        <td><%#Eval("Type")%></td>
                    </tr>
                </ItemTemplate>
            </asp:ListView>
        </table>
    </div>
    </form>
</body>
</html>
